package com.gadgets.framework.fm03.repository;

import com.gadgets.framework.fm03.dto.BusiFlowOperationDTO;
import com.gadgets.framework.fm03.dto.BusiFlowQueryDTO;
import com.gadgets.framework.fm03.pojo.BusiFlowInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author UncleXiu
 * @version V1.0.1
 * @data 2021-01-28
 * 
 */
@Repository
@Mapper
public interface IBusiFlowInfoRepository {

    /**
     * 新增流程信息
     * @param flowInfo  流程信息
     * @return          应答信息
     */
    public int insertFlowInfo(@Param(value = "flow") BusiFlowInfo flowInfo);

    /**
     * 条件查询业务流程
     * @param queryDto  查询条件
     * @return          查询结果
     */
    public List<BusiFlowInfo> queryBusiFlowByCondition(@Param(value = "queryDto") BusiFlowQueryDTO queryDto);

    /**
     * 更新业务流程状态
     * @param operationDTO  操作数据
     * @return              更新数据数量
     */
    public int updateFlowStatus(@Param(value = "operationDto")BusiFlowOperationDTO operationDTO);

}
